
#include "sha1base64.h"
#include "sha1.h"
#include "base64.h"

int sha1_base64( unsigned char * input, int input_len, char * b64str, int * len )
{
	unsigned char sha1Val[32] = {0};
	sha1(input, input_len, sha1Val);

	if( 0 != base64_encode((unsigned char * )b64str, len, sha1Val, 20))
	{
		return 1;
	}

	return 0;
}

